/*********************************************************************************
Organization 					: 				Georgia Institute of Technology
  
Institute 						:				Cognitive Computing Group(CCL)
 
Authors							: 				Manish Mehta 
 												
Class							:				CBRIndexHistory
 
Function						: 				A simple CBRIndexHistory class
												that holds the game state when a 
												particular goal is selected for execution
****************************************************************************/
package trace;

import java.io.Serializable;
import java.util.HashMap;

import planninglanguage.goals.Goal;
import base.WargusGameState;

public class CBRIndexHistory implements Serializable{
	private HashMap m_goalmap = new HashMap();
	public WargusGameState getGameState(String a_goalname)
	{
		return ((CBRIndexEntry)m_goalmap.get(a_goalname)).getGameState();
	}
	public Goal getGoal(String a_goalname)
	{
		return ((CBRIndexEntry)m_goalmap.get(a_goalname)).getGoal();
	}
	public CBRIndexEntry getCBRIndexEntry(String a_goalname)
	{
		return ((CBRIndexEntry)m_goalmap.get(a_goalname));
	}
	public void add(String a_goalname, WargusGameState a_gamestate, Goal a_goal)
	{
		CBRIndexEntry cbrindex = new CBRIndexEntry(a_goal, a_gamestate);
		m_goalmap.put(a_goalname, cbrindex);
	}
	public HashMap getHashMap()
	{
		return m_goalmap;
	}

	
}
